﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/DataViewList.Master" AutoEventWireup="true" Inherits="iSun.Web.UI.Controls.DojoListPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        var grid, store, dataStore; //用于dojo.common.list.base.js
        var _cells = [<%=DojoDataFields %>];
        var _ViewStructure = [
			  {
			      noscroll: false,
			      defaultCell: { width: "84px" },
			      cells:_cells 
			  }
			];          //列表结构
		var _dataJSON = "dtlist.xhjson?entity=<%=EntityName %>&functionid=<%=Function %>&condition=<%=Condition%>";
    </script>
    <script src="../_Scripts/dojo.common.list.base.js" type="text/javascript"></script>
    <script  type="text/javascript" language="javascript">
        var const_entityID = "<% =EntityId %>",//实体ID名称
        const_entityName = "<% =EntityName %>",//实体名称
        const_EditEntity = "<% =EditEntity %>",//编辑实体名
        const_functionId   ="<% =FunctionID %>",//自定义条件
        const_Order ="<% =Order %>",           //排序  
        const_UserId = "<% = UserId %>",       //当前用户ID
        //const_DataFields = [<% =DataFields %>],//
        //const_DataColums = [<% =DataColums %>],

        const_EditWindowWidth = "<% =EditWindowWidth %>px",//编辑界面宽
		const_EditWindowHeight = "<% =EditWindowHeight %>px",//编辑界面高

        const_QueryField="<% =QuciklyQueryFields %>",
        const_CustomCondition = encodeURI("<% =DefineCondition %>"),//查询方案条件
        const_Condition =  encodeURI("<% =Condition %>"),//
        const_PageTitle=encodeURI("<% =PageTitle %>"),
        _buttons = [<%=strButtons %>]; // "[<% %>]";
</script>
<script type="text/javascript" language="javascript">
    require(["dojo/ready", "dijit/Toolbar", "dijit/form/Button", "dojo/_base/array"], function (ready, Toolbar, Button, array) {
        ready(function () {
            var toolbar = new Toolbar({}, "toolbar");
            array.forEach(_buttons, function (label) {
                var button = new Button({
                    label: label.split("/")[1],
                    showLabel: true,
                    onClick: function () {
                        if (typeof (fnCommonBtnFn) == "function") {
                            fnCommonBtnFn(label.split("/")[0]);
                        }
                    },
                    iconClass: "dijitEditorIcon dijitEditorIcon" + label.split("/")[0]
                });
                toolbar.addChild(button);
            });
        });
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="toolbar" runat="server">

    <div id="toolbar"></div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentPlace" runat="server">
    <div id="grid"></div>
</asp:Content>
<%--<asp:Content ID="Content4" ContentPlaceHolderID="LeftData" runat="server">
   
</asp:Content>--%>
